﻿@{
    ViewBag.Title = "Jquery 加载 html内容";
}
<script type="text/javascript">
    function loadData() {
        $("#container").replaceWith("<ul><li>"+Date.now()+"</li></ul>");
        @*$.get('@Url.Action("PreLoadData", "AjaxDemo")'+'?rund'+Date.now(), function (html) {
            //  $("#container").empty().append(html);
            alert(html);
            $("#container").replaceWith(html);
            alert($("#container").html());
        })*@
    }
    function getData()
    {
        alert($("#myData li:last").html());
    }
</script>

<div id="container">
    我是一个人!
</div>
<input id="Button1" type="button" value="button" onclick="loadData()" />
<input id="Button2" type="button" value="button" onclick="getData()" />